<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>定时任务编辑</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }

		  return false;
		}

		$(document).ready(function() {
			//$("#name").focus();
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body class="hideScroll">
	<form:form id="inputForm" modelAttribute="sysScheduleJob" action="${ctx}/schedule/sysScheduleJob/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>

		<table class="table table-bordered table-condensed dataTables-example dataTable no-footer">
		    <tbody>


                        <tr>


                    <td class="width-15 active"><label class="pull-right">任务名称：</label></td>
                    <td class="width-35">
                        <form:input path="jobName" htmlEscape="false" maxlength="32" class="form-control input-xlarge required"/>
                        <span class="help-inline"><font color="red">*</font> </span>

                    </td>






                    <td class="width-15 active"><label class="pull-right">任务状态：</label></td>
                    <td class="width-35">
                        <form:radiobuttons path="jobStatus" items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
                        <span class="help-inline"><font color="red">*</font> </span>

                    </td>

                    </tr>



                        <tr>


                    <td class="width-15 active"><label class="pull-right">时间表达式：</label></td>
                    <td class="width-35">
                        <form:input path="cronExpression" htmlEscape="false" maxlength="32" class="form-control input-xlarge required"/>
                        <span class="help-inline"><font color="red">*</font> </span>

                    </td>






                    <td class="width-15 active"><label class="pull-right">并发启动：</label></td>
                    <td class="width-35">
                        <form:radiobuttons path="concurrent" items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
                        <span class="help-inline"><font color="red">*</font> </span>

                    </td>

                    </tr>



                        <tr>


                    <td class="width-15 active"><label class="pull-right">任务描述：</label></td>
                    <td class="width-35">
                        <form:textarea path="description" htmlEscape="false" rows="4" maxlength="256" class="form-control input-xlarge "/>

                    </td>






                    <td class="width-15 active"><label class="pull-right">任务所属组：</label></td>
                    <td class="width-35">
                        <form:input path="jobGroup" htmlEscape="false" maxlength="32" class="form-control input-xlarge required"/>
                        <span class="help-inline"><font color="red">*</font> </span>

                    </td>

                    </tr>



                        <tr>


                    <td class="width-15 active"><label class="pull-right">任务的类：</label></td>
                    <td class="width-35">
                        <form:input path="targetObject" htmlEscape="false" maxlength="32" class="form-control input-xlarge "/>

                    </td>






                    <td class="width-15 active"><label class="pull-right">类中的方法：</label></td>
                    <td class="width-35">
                        <form:input path="targetMethod" htmlEscape="false" maxlength="32" class="form-control input-xlarge "/>

                    </td>

                    </tr>



                        <tr>


                    <td class="width-15 active"><label class="pull-right">为Spring的Bean：</label></td>
                    <td class="width-35">
                        <form:radiobuttons path="isSpringBean" items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
                        <span class="help-inline"><font color="red">*</font> </span>

                    </td>






                    <td class="width-15 active"><label class="pull-right">全类名：</label></td>
                    <td class="width-35">
                        <form:input path="clazz" htmlEscape="false" maxlength="128" class="form-control input-xlarge "/>

                    </td>

                    </tr>



                        <tr>


                    <td class="width-15 active"><label class="pull-right">子任务：</label></td>
                    <td class="width-35">
                        <form:input path="childJobs" htmlEscape="false" maxlength="512" class="form-control input-xlarge "/>

                    </td>






                    <td class="width-15 active"><label class="pull-right">备注信息：</label></td>
                    <td class="width-35">
                        <form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control input-xlarge "/>

                    </td>

                    </tr>



		    </tbody>
		</table>

	</form:form>
</body>
</html>